#百分制成绩转换五分制E
grade=eval(input())
if grade<0 or grade>100:
    result="data error!"
elif grade>=90:
    result="A"
elif grade>=80 and grade<90:
    result="B"
elif grade>=70 and grade<80:
    result="C"
elif grade>=60 and grade<70:
    result="D"
else:
    result="E"
print(result)